import { getInfo, setInfo } from '@/utils/Storage'
export default{
    namespaced:true,
    state(){
        return{
            userInf:getInfo(),
            profile:{
                userName:'',
                avatar:''
            }
        }
    },
    mutations:{
        setUserInf(state,obj){
            state.userInf=obj
            setInfo(obj)
        },
        setProfile(state,obj){
            state.profile=obj
        }

    },
    actions:{},
    getters:{
        admin:state=>state.userInf.admin
    }
}